<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body>
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-form layui-card-header layuiadmin-card-header-auto"
				id="searchForm">
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">反馈人</label>
						<div class="layui-input-block">
							<input type="text" name="username" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					
					<div class="layui-inline">
						<label class="layui-form-label">手机</label>
						<div class="layui-input-block">
							<input type="text" name="mobile" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">反馈内容</label>
						<div class="layui-input-block">
							<input type="text" name="opinionContent" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">是否处理</label>
						<div class="layui-input-block">
							<select name="whetherDeal" lay-select-dict="whether_type">
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">反馈时间</label>
						<div class="layui-input-block">
							<input type="text" name="createTimeStart" id="createTimeStart"
								autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">至</label>
						<div class="layui-input-block">
							<input type="text" name="createimeEnd" id="createTimeEnd"
								autocomplete="off" class="layui-input">
						</div>
					</div>
					
					<div class="layui-inline">
						<button class="layui-btn layuiadmin-btn-sm" lay-submit
							lay-filter="searchSubmit">查询</button>
					</div>
				</div>
			</div>
			<div class="layui-card-body">
				<table id="dataList" lay-filter="dataList"></table>


			</div>
		</div>
	</div>
	<link rel="stylesheet" th:href="@{/css/common/loader.css}" media="all" />
	<link rel="stylesheet" th:href="@{/css/common/tablepage.css}"
		media="all" />
	<div type="text/html" id="trTool" style="display:none">
	{{#  if(d.whetherDeal=='0'){ }}
     <a   class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>已处理</a>
    {{#  } }}
    </div>

	<div th:include="include :: footer"></div>
	<script>
		layui.config({
					base : cxt + 'layuiadmin/' //静态资源所在路径
				})
				.extend({
					webplus : 'lib/webplus'//主入口模块

				})
				.use(
						[ 'table', 'form', 'laydate', 'webplus' ],
						function() {
							var $ = layui.$, webplus = layui.webplus, laydate = layui.laydate, form = layui.form, table = layui.table;
							//日期
							laydate.render({
								elem : '#createTimeStart'
							});
							//日期
							laydate.render({
								elem : '#createTimeEnd'
							});
						
							var cols = [ [ {
								type : 'numbers',
								title : '序号'
							}, {
								field : 'opinionId',
								title : '编号',
								hide:true
							}, {
								field : 'whetherDeal',
								title : 'whetherDeal',
								hide:true
							}, {
								field : 'username',
								title : '反馈人',
								width : 100
							}, {
								field : 'mobile',
								title : '手机',
								width : 130
							}, {
								field : 'opinionContent',
								title : '反馈内容',
								width : 250
							},
							{
								field : 'remark',
								title : '备注',
								width : 150
							}, 
							 {
								field : 'createTime',
								title : '反馈时间',
								width : 170
							}, {
								field : 'whetherDeal_dict',
								title : '是否处理',
								width : 90
							} ,{
								field : 'dealTime',
								title : '处理时间',
								width : 170
							} ,{

								title : '操作',
								toolbar : '#trTool',
								fixed: 'right',
								width :100
							} ] ];

							webplus.init('business/opinion/list', cols, '', '',
									'', '-1', '')
									//监听行工具事件
					      table.on('tool(dataList)', function(rowObj){
							 switch(rowObj.event){
							    case 'edit':
						    		webplus.openEditWindow('business/opinion/edit','已处理',rowObj,'opinionId','','500','240');
						       		
						   			break;    	
									    	
							    }
							 });
							

						});
	</script>

</body>
</html>